﻿@using Microsoft.AspNetCore.Mvc.Localization

@model ErrorViewModel

@inject IHtmlLocalizer HtmlLocalizer
@inject IViewLocalizer ViewLocalizer

@{
    ViewData["Title"] = ViewLocalizer["Error"];
}

<h1 class="text-danger">@ViewData["Title"].</h1>
<h2 class="text-danger">@ViewData["An error occurred while processing your request."]</h2>

@if (Model.ShowRequestId)
{
    <p>
        <strong>@ViewLocalizer["Request ID:"]</strong> <code>@Model.RequestId</code>
    </p>
}

<h3>@ViewLocalizer["Development Mode"]</h3>
<p>
    @HtmlLocalizer["Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred."]
</p>
<p>
    <strong>@ViewLocalizer["The Development environment shouldn't be enabled for deployed applications."]</strong>
    @ViewLocalizer["It can result in displaying sensitive information from exceptions to end users."]
    @HtmlLocalizer["For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong> and restarting the app."]
</p>
